package com.mo.system.role.control;

import com.mo.global.model.system.Role;
import com.mo.global.utils.ResultBody;
import com.mo.system.role.service.IRoleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @Auther:Lang
 * @Date:2022-12-05
 * @Time:10:11
 * @Description:TODO
 */
@RestController
@RequestMapping("/system")
public class RoleAction {
    @Autowired
    private IRoleService roleService;

    @RequestMapping("/all")
    public ResultBody queryAll(){
        ResultBody resultBody = new ResultBody();
        List<Role> roles = roleService.queryAll();
        resultBody.setData(roles);
        return resultBody;
    }
}
